<template>
  <ul class="author-data-info">
    <li>
      <h3>{{ author.followNum }}</h3>
      <h4>Follow</h4>
    </li>
    <li>
      <h3>{{ author.followedNum }}</h3>
      <h4>Followed</h4>
    </li>
    <li>
      <h3>{{ author.articleNum + author.sourceNum }}</h3>
      <h4>Works</h4>
    </li>
  </ul>
</template>

<script lang="ts" setup>
defineProps<{
  author: App.Author
}>()
</script>

<style scoped lang="scss">
.user-data-info {
  --w: var(--userDataInfoWidth);
  --h: var(--userDataInfoHeight);
  box-sizing: border-box;
  padding: calc(var(--h) / 6) calc(var(--w) / 10);
  border-radius: 3px;
  width: var(--w);
  height: var(--h);
  background-color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;

  li {
    flex-grow: 1;

    &:not(:last-child) {
      border-right: 1px solid var(--light);
    }

    h3 {
      font-size: calc(var(--h) / 6);
      font-weight: bold;
    }

    h4 {
      font-size: calc(var(--h) / 8);
      color: var(--dark);
      line-height: 2;
    }
  }
}
</style>
